home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / August 96 / OpenDoc & SOM Memory Allocation < prev    next >
Encoding:
Internet Message Format  |  1996-08-19  |  1.5 KB  |  [TEXT/ttxt]

  1. Subject:     OpenDoc & SOM Memory Allocation
  2. Sent:        8/14/96 12:11 PM
  3. Received:    8/14/96 12:31 PM
  4. From:        John Casey, jcasey@ncs-ssc.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8.  
  9. When passing data back and forth between OpenDoc parts and Extensions, 
  10. there is a clear definition of who needs to allocate and free memory.  
  11. Memory is always allocated by the sending object and deleted by the 
  12. receiving object.  ODF's FW_CByteArray can be used to help automate this 
  13. process.
  14.  
  15. When attempting to use the same convention for communicating with 
  16. SOMObjects, I have run into problems with ODF's delete operator override. 
  17.  Since my SOM Object does not use OpenDoc's Memory Manager, the new 
  18. performed by the SOMObject is not handled properly when attempting to 
  19. delete the received data in the OpenDoc Part.  To complicate problems, it 
  20. appears that CodeWarrior's C++ compiler ignores the scope operator when I 
  21. attempt to bypass OpenDoc's Memory manager by calling ::delete.
  22.  
  23. So ..... what is the "official" convention for memory management of data 
  24. passed between OpenDoc Parts and SOMObjects?
  25.  
  26.  
  27. ===========================================================================
  28. =
  29. John Casey                                     Mail: jcasey@ncs-ssc.com
  30. Vice President                                 Web:  
  31. http://www.ncs-ssc.com
  32. Nation Computer Services                       FAX:  (601) 689-8130
  33. ===========================================================================
  34. =
  35.  
  36.